%%% -*-mode:erlang;coding:utf-8;tab-width:4;c-basic-offset:4;indent-tabs-mode:()-*-
%%% ex: set ft=erlang fenc=utf-8 sts=4 ts=4 sw=4 et:
%%%
%%% Copyright 2015 Panagiotis Papadomitsos. All Rights Reserved.
%%%

{application, gen_rpc,
    [{description, "A scalable RPC library for Erlang-VM based languages"},
    {vsn, git},
    {mod, {gen_rpc_app, []}},
    {registered, [gen_rpc_dispatcher]},
    {maintainers, ["Panagiotis PJ Papadomitsos"]},
    {licenses, ["Apache 2.0"]},
    {links, [{"Github", "https://github.com/priestjim/gen_rpc"}]},
    {files, [
        "LICENSE",
        "README.md",
        "CHANGELOG.md",
        "include",
        "package.exs",
        "rebar.config",
        "src"
    ]},
    {applications, [kernel, stdlib, crypto, asn1, public_key, ssl]},
    {env,[
        %% TCP server port. Set to false to disable
        {tcp_server_port, 5369},
        %% Default TCP port for outgoing connections
        {tcp_client_port, 5369},
        %% SSL server port. Set to false to disable
        {ssl_server_port, false},
        %% SSL server options
        {ssl_server_options, []},
        %% Default SSL port for outgoing connections
        {ssl_client_port, 5370},
        %% SSL client options
        {ssl_client_options, []},
        %% Default driver to use for outgoing connections
        {default_client_driver, tcp},
        %% Fine-graned driver/port control
        %% for each outgoing client connection
        %% The internal implementation expects
        %% {internal, Map} whereh Map is a map of
        %% node_name => {driver, port} or node_name => driver
        %% which uses the default port for the specified client driver
        %% If you have an external service that allows discovery
        %% of port/node mappings, you can change this setting to
        %% {external, Module}
        {client_config_per_node, {internal, #{}}},
        %% List of modules available for RPC
        %% This is either whitelist, blacklist or disabled
        %% to disable the feature
        {rpc_module_control, disabled},
        %% This is the list of modules that the
        %% rule above applies to
        {rpc_module_list, []},
        %% Client connect timeout
        {connect_timeout, 5000},
        %% Client and Server send timeout
        {send_timeout, 5000},
        %% Authentication timeout
        {authentication_timeout, 5000},
        %% Default receive timeout for call() functions
        {call_receive_timeout, 15000},
        %% Default receive timeout for sbcast
        {sbcast_receive_timeout, 15000},
        %% Inactivity timeout for client gen_server
        {client_inactivity_timeout, infinity},
        %% Inactivity timeout for server gen_server
        {server_inactivity_timeout, infinity},
        %% Orphan async call process timeout
        {async_call_inactivity_timeout, infinity},
        %% Socket keepalive configuration
        %% Higher values for more resilient links/nodes
        %% Lower values for more volatile installations
        %% Seconds idle after the last packet of data sent
        %% to start sending keepalive probes
        {socket_keepalive_idle, 5},
        %% Seconds between probes
        {socket_keepalive_interval, 5},
        %% Probes lost to close the connection
        {socket_keepalive_count, 2},
        %% Local network interface to use.
        %% Set {0,0,0,0,0,0,0,0} to make server listen on all IPv6 interfaces.
        %% NOTE: IPv6 listener usualy accepts IPv4 clients,
        %% to force IPv6 only, set 'ipv6_only' option to 'true'
        {socket_ip, {0,0,0,0}},
        %% NOTE: this option has no effect unless 'socket_ip' is an IPv6 interface.
        {ipv6_only, false},
        %% ActiveN option for RPC acceptor socket
        {acceptor_socket_active_n, 100}
    ]},
    {modules, []}]
}.
